#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>

using namespace std;
using PII = pair<int, int>;

struct Edge{
    int a, b;
    double w;
    bool operator< (const Edge& W)const{
        return w < W.w;
    }
};

const int N = 510, M = N * N;

int n, k, cnt;
PII position[N];
int p[N];
Edge edge[M];
bool st[N];

int find(int x){
    if(x != p[x]){
        p[x] = find(p[x]);
    }

    return p[x];
}

double f(int i, int j){
    int a1 = position[i].first, b1 = position[i].second;
    int a2 = position[j].first, b2 = position[j].second;

    int k1 = (a1 - a2) * (a1 - a2);
    int k2 = (b1 - b2) * (b1 - b2);
    return sqrt(k1 + k2);
}

void init(){
    for(int i = 1; i <= n; i ++){
        for(int j = i + 1; j <= n; j ++){
            double dis = f(i, j);
            edge[cnt].a = i;
            edge[cnt].b = j;
            edge[cnt].w = dis;
            cnt ++;
        }
    }

    sort(edge, edge + cnt);
}

bool check(int u){
    memset(st, 0, sizeof st);

    for(int i = 1; i <= n; i ++){
        p[i] = i;
    }

    for(int i = 0; i <= u; i ++){
        int x = edge[i].a;
        int y = edge[i].b;
        int a = find(x), b = find(y);
        if(a != b){
            p[a] = p[b];
        }
    }

    int nums = 0;
    for(int i = 1; i <= n; i ++){
        st[find(i)] = true;
    }

    for(int i = 1; i <= n; i ++){
        if(st[i]) nums ++;
    }

    if(nums <= 1){
        return true;
    }else{
        return nums <= k;
    }

}


double solve(){
    if(n <= k){
        return 0;
    }

    int l = 0, r = cnt;

    while(l < r){
        int mid = (l + r) >> 1;
        if(check(mid)) r = mid;
        else l = mid + 1;
    }

    return edge[l].w;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    scanf("%d%d", &n, &k);
    for(int i = 1; i <= n; i ++){
        int x, y;
        scanf("%d%d", &x, &y);
        position[i].first = x;
        position[i].second = y;
    }

    init();

    double res = solve();
    printf("%.2f", res);

    return 0;
}